package com.qf.service;

import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import com.qf.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 千锋健哥
 */
@Service
public class ServiceBImpl implements ServiceB{

    @Autowired
    private UserDao userDao;

    @Override
    @Transactional
    @LcnTransaction
    public void add() {
        //b账户增加款项
        userDao.update();
        //模拟异常, 看两个数据是否都能够回滚
        int i =1/0;
    }

}
